package com.yss.sofa.report.engine.cell.visible.form;

import com.yss.sofa.report.engine.Const;
import com.yss.sofa.report.engine.cell.ReportCell;


public class NumberFormCell extends FormCell{
	private static final long serialVersionUID = 7593690239092859054L;
	private String max;
	private String min;
	private String precision;
	protected void init(){
		super.init();
		precision="0";
		inputType=Const.FORM_INPUT_TYPE_NUMBER;
	}
	public void assignTo(ReportCell cell){
		NumberFormCell _=(NumberFormCell)cell;
		super.assignTo(_);
		_.max=this.max;
		_.min=this.min;
		_.precision=this.precision;
	}
	public NumberFormCell create(){
		NumberFormCell _=new NumberFormCell();
		this.assignTo(_);
		return _;
	}
	public String getRenderSource() {
		return "number-field";
	}
	
	public String getMax() {
		return max;
	}
	
	public void setMax(String max) {
		this.max = max;
	}
	public String getMin() {
		return min;
	}
	public void setMin(String min) {
		this.min = min;
	}
	public String getPrecision() {
		return precision;
	}
	public void setPrecision(String precision) {
		this.precision = precision;
	}
	@Override
	public boolean isCustom() {
		return false;
	}

	@Override
	public String getJsRaw(){
		return getJsValue();
	}
}
